<template>
	<view>
		<!-- 列表 -->
		<view class="list" v-for="(item,index) in lists" :key='index' >
			<!-- //剩余时间，付款，电话 -->
			<view class="time_pay_tel">
				<view class="time_text">
					{{item.order_code}}
				</view>
				<view>
					<text class="pay">{{item.status}}</text>
					<text class="icon iconfont" @click="more(item.phone)">&#xe66d;</text>
				</view>
			</view>
			<!-- 中间今天，用时，服务，价格，二维码 -->
			<view class="list_center">
				<view class="list_center_left">
					<view class="left_text1">
						<text style="margin-right: 15rpx;">{{item.subscribe}}</text>
						<text>{{item.content}}·{{item.people}}人</text>
					</view>
					<view>
						<text class="icon iconfont">&#xe602;</text>
						<text class="pub">服务： </text>
						<text class="pub1">洗护+修剪+造型</text>
					</view>
					<view>
						<text class="icon iconfont ics">&#xe602;</text>
						<text class="pub">用时：</text>
						<text class="pub1">预计1小时 </text>
					</view>
				</view>
				<view class="list_center_right">
					<view class="code">
						<text class="icon iconfont">&#xe605;</text>
					</view>
					<view class="price">
						<text class="price_text">￥</text>
						<text class="price_text2">{{item.price}}</text>
					</view>
				</view>
			</view>
			<!-- 头像接单次数,取消，立即付款 -->
			<view class="list_bottom">
				<view class="list_bottom_left">
					<view>
						<u-avatar src="https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1194131577,2954769920&fm=26&gp=0.jpg" size='70' show-sex='true'  sex-icon='woman'></u-avatar>
					</view>
					<view style="margin-left: 19rpx;">
						<view class="names">
							<text>{{item.name}}</text>
							<!-- <text>高级美发师</text> -->
						</view>
						<view class="number">
							<text>接单{{item.serve_count}}次 丨</text>
							<text>好评{{item.fraction}}分</text>
						</view>
					</view>
				</view>
				<view>
					<text class="cancel" @click="lookDetail">详情</text>
					<text class="yes">正在确认</text>
				</view>
			</view>
		</view>
		<!-- //弹出层 -->
		<uni-popup type="bottom" ref='confirmed'>
			<view class="pops">
				<view class="title">
					更多选择
				</view>
				<view class="phone" @click="call">电话联系</view>
				<view class="cancel_order" @click="cancel_order">取消订单</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				lists:[
					{
						order_code:'订单编号：CD028000001',//剩余时间
						status:'待确定',//状态
						phone:'10086',//电话
						subscribe:'今天11:00',//预约的时间
						content:'洗剪吹',//预约的内容
						people:'1',//预约的人数
						serve_cont:'洗护+修剪+造型',//服务的内容
						able_time:'预计时间1小时',//用时
						price:'260',//服务的价格
						name:'张艺兴｜高级美发师 ',//设计师的名字
						
						serve_count:'23',//服务次数
						fraction:'4.9'//服务得分
					},
					{
						order_code:'订单编号：CD028000001',//剩余时间
						status:'待确定',//状态
						phone:'1008611',//电话
						subscribe:'明天14:00',//预约的时间
						content:'吹洗',//预约的内容
						people:'1',//预约的人数
						serve_cont:'修手指+造型+护理',//服务的内容
						able_time:'预计时间1.5小时',//用时
						price:'260',//服务的价格
						name:'NICE造型美发沙龙 ',//设计师的名字
						
						serve_count:'23',//服务次数
						fraction:'4.9'//服务得分
					},
					{
						order_code:'订单编号：CD028000001',//剩余时间
						status:'待确定',//状态
						phone:'10086',//电话
						subscribe:'明天14:00',//预约的时间
						content:'吹洗',//预约的内容
						people:'1',//预约的人数
						serve_cont:'修手指+造型+护理',//服务的内容
						able_time:'预计时间1.5小时',//用时
						price:'260',//服务的价格
						name:'NICE造型美发沙龙 ',//设计师的名字
						
						serve_count:'23',//服务次数
						fraction:'4.9'//服务得分
					},
					],
					tel:''
			}
		},
		methods:{
			more(tel){
				this.$refs.confirmed.open()
				this.tel = tel
			},
			//电话联系
			call(){
				uni.makePhoneCall({
					phoneNumber:this.tel
				})
			},
			//取消订单
			cancel_order(){
				this.$refs.confirmed.close()
			},
			//点击详情
			lookDetail(){
				uni.navigateTo({
					url:'./order_detail'
				})
			}
		}
	}
</script>
<style>
	
</style>
<style scoped lang="less">
//列表
.list{
	padding: 21rpx 27rpx;	
	box-shadow: 0rpx 2rpx 7rpx 0rpx rgba(113, 113, 113, 0.26);
	background: white;
	padding-bottom: 0;
	margin-bottom: 20rpx;
	//剩余时间，付款，电话
	.time_pay_tel{
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
		border-bottom: 1rpx solid #E1E1E1;
		padding-bottom: 10rpx;
		.time_text{			
			font-size: 22rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #00C6C2;
		}
		.pay{			
			font-size: 24rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #8E8E8E;
		}
		.iconfont{
			font-size: 40rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #8E8E8E;
			margin-left: 25rpx;
			display:inline-block;
			transform: translateY(5rpx);
		}
	}
	//中间，时间，服务，用时，二维码，价格
	.list_center{
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		border-bottom: 1rpx solid #E1E1E1;
		padding: 27rpx 0rpx;
		.list_center_left{
			.left_text1{				
				height: 29rpx;
				font-size: 30rpx;
				font-family: PingFang;
				font-weight: bold;
				color: #282828;
				line-height: 30rpx;
				margin-bottom: 27rpx;
			}
			.pub{
				
				height: 23rpx;
				font-size: 24rpx;
				font-family: PingFang;
				font-weight: bold;
				color: #414141;
				line-height: 30rpx;
			}
			.pub1{
				height: 23rpx;
				font-size: 24rpx;
				font-family: PingFang;
				
				color: #414141;
				line-height: 30rpx;
			}
			.iconfont{
				color: #00C6C2;
				margin-right: 19rpx;
				
			}
			.ics{
				color: black;
			}
		}
		.list_center_right{
			text-align: center;
			.code{
				.iconfont{
					font-size: 50rpx;
					color: #282828;
				}
			}
			.price{
					margin-top: 46rpx;
					
				.price_text{
					
					font-size: 22rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #000000;
				}
				.price_text2{
				
					font-size: 36rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #000000;
				}
			}
		}
	}
	//底部
	.list_bottom{
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		padding-top: 16rpx;
		padding-bottom: 14rpx;
		.list_bottom_left{
			display: flex;
			.names{		
			
				font-size: 24rpx;
				font-family: PingFang;
				font-weight: bold;
				color: #333333;
				margin-bottom: 16rpx;
			}
			.number{				
				font-size: 18rpx;
				font-family: PingFang;
				font-weight: 500;
				color: #777777;
			}
		}
		.cancel{
			display: inline-block;
			width: 106rpx;
			height: 58rpx;
			border: 1rpx solid #979797;
			border-radius: 4rpx;
			text-align: center;
			line-height: 58rpx;			
			font-size: 26rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #414141;
		}
		.yes{
			display: inline-block;
			width: 141rpx;
			height: 58rpx;
			background: #00C6C2;
			border-radius: 4rpx;
			text-align: center;
			line-height: 58rpx;
			margin-left: 27rpx;
			font-size: 26rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #FFFFFF;
		}
	}
}

.pops{
	height: 781rpx;
	background: white;
	
	.title{
		display: flex;
		justify-content: center;		
		font-size: 30rpx;
		font-family: PingFang;
		font-weight: bold;
		color: #282828;
		line-height: 30px;
		border-bottom: 1rpx solid #E0E0E0;
	}
	.phone{
		width: 649rpx;
		height: 77rpx;
		background: #FFFFFF;
		border: 1rpx solid #414141;
		border-radius: 38rpx;
		margin: 45rpx auto;
		display: flex;
		justify-content: center;
		align-items: center;		
		font-size: 30rpx;
		font-family: PingFang;
		font-weight: bold;
		color: #414141;
	}
	.cancel_order{
		width: 649rpx;
		height: 77rpx;
		background: #FFFFFF;
		border: 1rpx solid #414141;
		border-radius: 38rpx;
		display: flex;
		justify-content: center;
		align-items: center;		
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #9B9B9B;
		margin: 28rpx auto;
	}
}
</style>
